-
Notifications
You must be signed in to change notification settings - Fork 13
samples: migrate samples from java-docs-samples #73
Conversation
Codecov Report
@@ Coverage Diff @@
## master #73 +/- ##
=========================================
Coverage 75.36% 75.36%
Complexity 548 548
=========================================
Files 48 48
Lines 4992 4992
Branches 44 44
=========================================
Hits 3762 3762
Misses 1174 1174
Partials 56 56 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL - RFC 2606 & 6761 example.com
In general, we don't like to use com.google
in samples as users might copy them by accident.
If these aren't new files, then the 2019 copyright is ok, but if they are all new, then they should be updated to 2020.
It's idiomatic java to just let exceptions propagate unless your going to do something about them. If we can explain why they might get an exception it's good, it's better if we can suggest a mitigation strategy. Printing a stack trace isn't typically what we want users doing in production code.
I like how you've done the 3 pom's. that looks like a great strategy.
...les/snippets/src/main/java/com/google/cloud/gameservices/samples/clusters/CreateCluster.java
Outdated
Show resolved
Hide resolved
...les/snippets/src/main/java/com/google/cloud/gameservices/samples/clusters/DeleteCluster.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/google/cloud/gameservices/samples/clusters/GetCluster.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/google/cloud/gameservices/samples/clusters/ListClusters.java
Outdated
Show resolved
Hide resolved
...les/snippets/src/main/java/com/google/cloud/gameservices/samples/clusters/UpdateCluster.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/google/cloud/gameservices/samples/realms/UpdateRealm.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/google/cloud/gameservices/samples/realms/UpdateRealm.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/test/java/com/google/cloud/gameservices/samples/ClusterTests.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/test/java/com/google/cloud/gameservices/samples/ClusterTests.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/test/java/com/google/cloud/gameservices/samples/DeploymentTests.java
Outdated
Show resolved
Hide resolved
Wondering why this was closed without merging? These samples would be good to include at https://cloud.google.com/game-servers/docs. |
I think it conflicts now - we may need to try again. |
The alpha client's samples were not used on cloudsite and the API surface area on the alpha client significantly changed/broke (samples no longer compiled). The service now has published both a beta and GA endpoint whose clients are now available here. |
Merged and resolved conflicts through github UX, let's see how it does with tests. |
Got all tests passing. |
samples/snippets/src/test/java/com/example/gameservices/GameServicesTestUtil.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - there is one question re: GameServicesTestUtil.java
- Why do you catch and printout errors rather than just letting things fail.
Reverting changes to kokoro config GOOGLE_APPLICATION_CREDENTIALS. |
Migrates the samples that still work from https://github.com/GoogleCloudPlatform/java-docs-samples